<?php 
$xxspId = $this->getXxspId();
$tlId = $this->getTlId();
$grxhId = $this->getGrxhId();
$jjryId = $this->getJjryId();
$lymmId = $this->getLymmId();
$ylId = $this->getYlId();
$jsId = $this->getJsId();

$xxsp = $this->getTree($xxspId);
$tl = $this->getTree($tlId);
$grxh = $this->getTree($grxhId);
$jjry = $this->getTree($jjryId);
$lymm = $this->getTree($lymmId);
$ylJs = $this->getJsAndYl();
?>
<div class="nav-container">
    <ul id="nav">
    	<li class="category">
    		<a href="/index.php/catalog/category/view/id/12">所有产品分类</a>
    		<ul class="sub-category">
    			<li>
                    <p><span></span><a href="<?php echo $this->getCatUrl($xxspId) ?>"><?php echo $this->getCatName($xxspId) ?></a><i class="fa fa-angle-right"></i></p>
                    <p class="sub-cat" ></p>
                    <?php if(!empty($xxsp)): ?>
                    <ul style="display:none;">
                        <?php foreach($xxsp as $k => $c): ?>
                            <li>
                                <a href="<?php echo $c['url'] ?>"><?php echo $k ?></a>
                                <p>
                                <?php $i = 1;  foreach($c['children'] as $kk => $cc): ?>
                                    <a href="<?php echo $cc ?>"><?php echo $kk ?></a>
                                <?php if($i != count($c['children'])): ?>
                                    &nbsp;|&nbsp;
                                <?php endif; ?>
                                <?php $i++; ?>
                                <?php endforeach; ?>
                                </p>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                    <?php endif; ?>
                </li>
    			<li>
                    <p><span></span><a href="<?php echo $this->getCatUrl($jsId) ?>"><?php echo $this->getCatName($jsId) ?></a>/<a href="<?php echo $this->getCatUrl($ylId) ?>"><?php echo $this->getCatName($ylId) ?></a><i class="fa fa-angle-right"></i></p>
                    <p class="sub-cat" ></p>
                    <?php if(!empty($ylJs)): ?>
                    <ul style="display:none;">
                        <?php foreach($ylJs as $k => $c): ?>
                            <li>
                                <a href="<?php echo $c['url'] ?>"><?php echo $k ?></a>
                                <p>
                                <?php $i = 1;  foreach($c['children'] as $kk => $cc): ?>
                                    <a href="<?php echo $cc ?>"><?php echo $kk ?></a>
                                <?php if($i != count($c['children'])): ?>
                                    &nbsp;|&nbsp;
                                <?php endif; ?>
                                <?php $i++; ?>
                                <?php endforeach; ?>
                                </p>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                    <?php endif; ?>
                </li>
    			<li>
                    <p><span></span><a href="<?php echo $this->getCatUrl($lymmId) ?>"><?php echo $this->getCatName($lymmId) ?></a><i class="fa fa-angle-right"></i></p>
                    <p class="sub-cat" ></p>
                    <?php if(!empty($lymm)): ?>
                    <ul style="display:none;">
                        <?php foreach($lymm as $k => $c): ?>
                            <li>
                                <a href="<?php echo $c['url'] ?>"><?php echo $k ?></a>
                                <p>
                                <?php $i = 1;  foreach($c['children'] as $kk => $cc): ?>
                                    <a href="<?php echo $cc ?>"><?php echo $kk ?></a>
                                <?php if($i != count($c['children'])): ?>
                                    &nbsp;|&nbsp;
                                <?php endif; ?>
                                <?php $i++; ?>
                                <?php endforeach; ?>
                                </p>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                    <?php endif; ?>
                </li>
    			<li>
                    <p><span></span><a href="<?php echo $this->getCatUrl($jjryId) ?>"><?php echo $this->getCatName($jjryId) ?></a><i class="fa fa-angle-right"></i></p>
                    <p class="sub-cat" ></p>
                    <?php if(!empty($jjry)): ?>
                    <ul style="display:none;">
                        <?php foreach($jjry as $k => $c): ?>
                            <li>
                                <a href="<?php echo $c['url'] ?>"><?php echo $k ?></a>
                                <p>
                                <?php $i = 1;  foreach($c['children'] as $kk => $cc): ?>
                                    <a href="<?php echo $cc ?>"><?php echo $kk ?></a>
                                <?php if($i != count($c['children'])): ?>
                                    &nbsp;|&nbsp;
                                <?php endif; ?>
                                <?php $i++; ?>
                                <?php endforeach; ?>
                                </p>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                    <?php endif; ?>
                </li>
    			<li>
                    <p><span></span><a href="<?php echo $this->getCatUrl($tlId) ?>"><?php echo $this->getCatName($tlId) ?></a><i class="fa fa-angle-right"></i></p>
                    <p class="sub-cat" ></p>
                    <?php if(!empty($tl)): ?>
                    <ul style="display:none;">
                        <?php foreach($tl as $k => $c): ?>
                            <li>
                                <a href="<?php echo $c['url'] ?>"><?php echo $k ?></a>
                                <p>
                                <?php $i = 1;  foreach($c['children'] as $kk => $cc): ?>
                                    <a href="<?php echo $cc ?>"><?php echo $kk ?></a>
                                <?php if($i != count($c['children'])): ?>
                                    &nbsp;|&nbsp;
                                <?php endif; ?>
                                <?php $i++; ?>
                                <?php endforeach; ?>
                                </p>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                    <?php endif; ?>
                </li>
    			<li>
                    <p><span></span><a href="<?php echo $this->getCatUrl($grxhId) ?>"><?php echo $this->getCatName($grxhId) ?></a><i class="fa fa-angle-right"></i></p>
                    <p class="sub-cat" ></p>
                    <?php if(!empty($grxh)): ?>
                    <ul style="display:none;">
                        <?php foreach($grxh as $k => $c): ?>
                            <li>
                                <a href="<?php echo $c['url'] ?>"><?php echo $k ?></a>
                                <p>
                                <?php $i = 1;  foreach($c['children'] as $kk => $cc): ?>
                                    <a href="<?php echo $cc ?>"><?php echo $kk ?></a>
                                <?php if($i != count($c['children'])): ?>
                                    &nbsp;|&nbsp;
                                <?php endif; ?>
                                <?php $i++; ?>
                                <?php endforeach; ?>
                                </p>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                    <?php endif; ?>
                </li>
    		</ul>
            <p class="cat-over" style="display:none"></p>
    	</li>
    	<li class="home"><a href="/">首页</a></li>
        <li class="home"><a href="/index.php/admin_zgb/recent/index/">最近购买</a></li>
        <li class="accout"><a href="/customer/account/">商户中心</a></li>
    </ul>
</div>